<?php

class IpModel extends Model {

	public function __construct() {
		$this->db = M('ip');
	}

	public function addip($ip, $style ,$did) {
		$data = array('ip'=>$ip,'click'=>0,'type'=>$style,'time'=>time(),'did'=>$did);
		return $this->db->add($data);
	}

}